<template>
  <div class="child">
    <h3>Child1</h3>
    <p>我的count值是{{count}}</p>
    <button @click="$parent.count++">改变父组件的count</button>
    <button @click="$parent.num++">改变父组件的num</button>
  </div>
</template>

<script>
export default {
    name:"Child1",
    data(){
        return{
            count:0
        }
    },
    mounted() {
        console.log(this.$parent,111);
    },
}
</script>

<style scoped>
.child{
    background: yellowgreen;
}
</style>